<%@page contentType="text/html; UTF-8" pageEncoding="UTF-8"  language="java" isELIgnored="false" %>
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>更新员工</title>
</head>

<body align="center">
<h2>更新员工信息</h2>
<br><br>
<div>
    <form action="${pageContext.request.contextPath}/emp/update" method="post">
        <table cellpadding="0" cellspacing="10" border="0" align="center"
               class="form_table">
            <tr>
                <td valign="middle" align="center">
                    id
                </td>
                <td valign="middle" align="left">
                    <input type="text" name="id" value="${requestScope.emp.id}" readonly="readonly">
                </td>
            </tr>
            <tr>
                <td valign="middle" align="center">
                    姓名
                </td>
                <td valign="middle" align="left">
                    <input type="text" name="name" value="${requestScope.emp.name}">
                </td>
            </tr>
            <tr>
                <td valign="middle" align="center">
                    籍贯
                </td>
                <td valign="middle" align="left">
                    <select name="origin" style=" height: 25px; width: 175px" id="sel">
                        <option value="北京市">北京市</option>
                        <option value="浙江省">浙江省</option>
                        <option value="天津市">天津市</option>
                        <option value="安徽省">安徽省</option>
                        <option value="上海市">上海市</option>
                        <option value="福建省">福建省</option>
                        <option value="重庆市">重庆市</option>
                        <option value="江西省">江西省</option>
                        <option value="山东省">山东省</option>
                        <option value="河南省">河南省</option>
                        <option value="湖北省">湖北省</option>
                        <option value="湖南省">湖南省</option>
                        <option value="广东省">广东省</option>
                        <option value="海南省">海南省</option>
                        <option value="山西省">山西省</option>
                        <option value="青海省">青海省</option>
                        <option value="江苏省">江苏省</option>
                        <option value="辽宁省">辽宁省</option>
                        <option value="吉林省">吉林省</option>
                        <option value="台湾省">台湾省</option>
                        <option value="河北省">河北省</option>
                        <option value="贵州省">贵州省</option>
                        <option value="四川省">四川省</option>
                        <option value="云南省">云南省</option>
                        <option value="陕西省">陕西省</option>
                        <option value="甘肃省">甘肃省</option>
                        <option value="黑龙江省">黑龙江省</option>
                    </select>
                </td>
            </tr>
        </table>
        <p>
            <input type="submit" class="button" value="保存">
            &nbsp;
            <input type="button" class="button" onclick="location.href='${pageContext.request.contextPath}/emp/findAll'" value="返回" >
        </p>
    </form>
</div>
</body>

<script>
    document.getElementById("sel").value = "${requestScope.emp.origin}";
</script>
</html>